import lxml.html as HTML,chardet
import urllib2
import re
haha = urllib2.urlopen('http://192.168.1.66:1981/randomize/').read()
aa=  HTML.document_fromstring(haha)
for i in aa.xpath('//a/@href'):

    print re.match(r'(\S+).txt',i)